#!/bin/bash

# 打印脚本命令.
set -x
# 在有错误输出时停止运行.
set -e

#info
clear
ONOS_HOME=~/onos
echo "...run onos NDN..."

#NDN-app-compile

echo "compile NDN apps..."

cd $ONOS_HOME/apps/NDNandSINETandGEO/pipeconf/src/main/resources/
make

cd $ONOS_HOME/apps/NDNandSINETandGEO/pipeconf/
bazel build //apps/NDNandSINETandGEO/pipeconf:all

cd /home/ylmsi3/JavaCode/onos/apps/ipv4plus-app
mvn clean install

#new terminal for app install

cd $ONOS_HOME/
gnome-terminal --window -x bash -c "bash ./iprun-app.sh"

#onos-start

echo "starting onos..."
cd $ONOS_HOME
bazel run onos-local clean


